package com.elliot.util;

import android.content.Context;
import android.text.TextUtils;

public class NormalUtil {

    public static boolean isNull(String string) {
        if (TextUtils.isEmpty(string) || string.equals("null")) {
            return true;
        }
        return false;
    }

    public static int dip2px(Context context, float dipValue) {
        if (context == null) {
            return (int) (dipValue * 1 + 0.5f);
        }
        final float scale = context.getResources().getDisplayMetrics().density;

        return (int) (dipValue * scale + 0.5f);
    }

}